{% extends "base.html" %}
<!--header 导航条-->
{% block head %}
    <title>{{ post.title }}</title>
{% endblock %}
{% block main-wrapper %}
    <div class="main-wrapper">
        <div class="content-wrapper">
            <div class="content">
                <div class="title">{{ post.title }}</div>
                <div class="data">{{ post.create_time }} 预计阅读时间10min</div>
                <div class="tags">
                    <i class="fa fa-tags"></i>
                    {% for tag in post.tags.all %}
                                        <span class="tag-item"><a href="">{{ tag.tag_name }}</a> </span>

                    {% endfor %}

                </div>
                <div class="post-content">
                    <p class="content">
                        {{ post.content|safe }}
                    </p>

                </div>
                <div class="page-button">
                    {% if prev_post %}
                        <div class="prev">
                            <span>Newer Post</span>
                            <a href="/post_detail/?id={{ prev_post.id }}"><i
                                    class="fa fa-angle-double-left"></i><span>{{ prev_post.title }}</span></a>
                        </div>
                    {% endif %}
                    {% if next_post %}
                        <div class="next">
                            <span>Older Post</span>
                            <a href="/post_detail/?id={{ next_post.id }}"><span>{{ next_post.title }}</span><i
                                    class="fa fa-angle-double-right"></i></a>
                        </div>
                    {% endif %}

                </div>
            </div>
            <div class="side-nav">
                <ul class="side-menu recent-post">
                    <p class="title">近期文章</p>
                    {% for post in recent_post %}
                        <li class="post-item"><a href="/post_detail/?id={{ post.id }}">{{ post.title }}</a></li>
                    {% endfor %}


                </ul>
                <ul class="side-menu post-build">
{#                    <p class="title">文章结构</p>#}
{#                    <li class="post-item">神马是Java</li>#}
{#                    <li class="post-item">神马是python</li>#}
{#                    <li class="post-item">神马是c++</li>#}
{#                    <li class="post-item">php</li>#}
                </ul>
            </div>
        </div>
    </div>
{% endblock %}
{% block footer %}
    <footer>
        <section class="footer-menus">
            <ul>
                <li>Social</li>
                <li>GitHub</li>
                <li>Bilibili</li>
                <li>博客</li>
            </ul>
            <ul>
                <li>联系我</li>
                <li>QQ:178320369</li>
                <li>Email:178320369@qq.com</li>
            </ul>
        </section>
    </footer>
{% endblock %}
